package com.lsc.www.day09.hm;

import java.util.Scanner;

public class h0 {
    public static void main(String[] args) {
        System.out.println("输入a,b的值：");
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

        if (a % b == 0 || a + b > 1000){
            System.out.println(a);
        }else {
            System.out.println(b);
        }
    }
}
